package class15to16_UnionSet;

import java.lang.reflect.Array;
import java.util.Arrays;
import java.util.Comparator;

public class Demo {
    public static void main(String[] args) {
        int[][] arr = {{1,2},{5,4},{3,2}};
        Arrays.sort(arr, new Comparator<int[]>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                return o1[0]-o2[0];
            }
        });
        for(int[] a: arr){
            for(int b:a) System.out.println(b);
        }
    }
}
